#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	double F, C;
	scanf("%lf", &F);

	C = 5 * (F - 32) / 9;

	printf("%lf", C);
	return 0;
}